package me.shurufa.widget;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;
import android.view.MotionEvent;

/**
 * 解决横向滑动与下拉刷新冲突
 *
 * @FileName: me.shurufa.widget.DiscoverRecyclerView.java
 * @author: kHRYSTAL
 * @email: 723526676@qq.com
 * @date: 2016-01-26 00:31
 */
public class DiscoverRecyclerView extends RecyclerView{

    public DiscoverRecyclerView(Context context) {
        super(context);
    }

    public DiscoverRecyclerView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public DiscoverRecyclerView(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
    }

    @Override
    public boolean onTouchEvent(MotionEvent e) {
        getParent().requestDisallowInterceptTouchEvent(true);
        return super.onTouchEvent(e);
    }
}
